
import request from '@/utils/request'


// 技能认证列表
export function listData(query) {
  return request({
    url: `/ability`,
    method: 'get',
    params: query
  })
}

// 审核用户技能
export function abilityVerify(query) {
    return request({
      url: `/ability/verify`,
      method: 'post',
      data: query
    })
}
// 撤销用户技能审核
export function abilityCancel(form) {
  return request({
    url:`/ability/cancel`,
    method:'post',
    data: form
  })
}

  // 技能配置列表
export function accompanyList(data) {
  return request({
    url: `/accompany`,
    method: 'get',
    params: data
  })
}
// 添加技能
export function accompanyCreate(form) {
  return request({
    url: `/accompany/create`,
    method: 'post',
    data: form
  })
}
// 编辑技能
export function accompanyUpdate(form) {
  return request({
    url: `/accompany/update`,
    method: 'post',
    data: form
  });
}
// 删除技能
export function accompanyDel(id) {
  return request({
    url:`/accompany/del/${id}`,
    method:'delete',
    data: id
  })
}

/**
 * 
 * @param {
 * 退款审核
 * } query 
 * @returns 
 */

// 退款申诉审核列表
export function accompanyRefund(query) {
  return request({
    url: `accompany/refund`,
    method: 'get',
    params: query
  })
}
// 退款申诉审核
export function refundAudit(query) {
  return request({
    url: `/accompany/refund/audit`,
    method: 'post',
    data: query
  })
}

/**
 * 
 * @param {
 * 优惠券
 * } query 
 * @returns 
 */
// 优惠券列表
export function accompanyCoupon(query) {
  return request({
    url: `/accompany/coupon`,
    method: 'get',
    params: query
  })
}
// 添加优惠券 
export function couponSave(query) {
  return request({
    url: `/accompany/coupon/save`,
    method: 'post',
    data: query
  })
}
// 编辑优惠券
export function couponUpdate(query) {
  return request({
    url: `/accompany/coupon/update`,
    method: 'post',
    data: query
  })
}
// 删除优惠券
export function couponDel(query) {
  return request({
    url: `/accompany/coupon/del`,
    method: 'post',
    data: query
  })
}


/***
 * 
 * 陪玩
 * 
 */
// 陪玩列表
export function accompanyUser(query) {
  return request({
    url: `/accompany/user`,
    method: 'get',
    params: query
  })
}
// 封禁
export function userBan(query) {
  return request({
    url: `/accompany/user/ban`,
    method: 'get',
    params: query
  })
}

/**
 * 
 * 订单
 * 
 */
// 订单列表
export function orderList(query) {
  return request({
    url: `/accompany/order`,
    method: 'get',
    params: query
  })
}

// 修改等级
export function userLevel(query) {
  return request({
    url: `/accompany/user/level`,
    method: 'post',
    data: query
  })
}

// excel修改等级
export function userLevelExcel(query) {
  return request({
    url: `/accompany/user/excel`,
    method: 'post',
    data: query
  })
}

// 重置等级
export function levelResetting(query) {
  return request({
    url: `/accompany/user/level/resetting`,
    method: 'get',
    params: query
  })
}

// 陪玩等级列表
export function getUserLevel(query) {
  return request({
    url: `/accompany/user/level`,
    method: 'get',
    params: query
  })
}

// 设置冥想师
export function accompanyCreateUser(query) {
  return request({
    url: `/accompany/create/user`,
    method: 'post',
    data: query
  })
}